/**
 * Created by Delicate on 2017/5/31.
 */
let layer,$;
require(['jquery', 'common', 'validate', 'layer'], function (a,b,c,d) {
    $ = a;
    layer = d;
    init();
    monitor();
    service();
})
const init = () => {
    if(top !== self){
        top.location.href = location.href;
    }
}
const monitor = () => {

}
const service = () => {

}
const submit = obj => {
    var config = {
        "url":"#(contextPath)/admin/doLogin/",
        "method":"POST",
        "tips":"您即将进入后台管理系统，是否继续",
        data:{"username":$("#username").val(),"userpass":$("#userpass").val()}
    };
    var backendTool = new BackendTool(config);
    backendTool.successCallBack=function(data){
        if(data.result){
            location.href="#(contextPath)/admin/";
        }else{
            layer.alert(data.msg)
        }
    }
    backendTool.ajaxRequest();
}